<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>首页 - 树状图统计</title>
		<meta name="description" content="overview &amp; stats" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
		
		<style>

.node {
  cursor: pointer;
}

.node circle {
  fill: #fff;
  stroke: steelblue;
  stroke-width: 1.5px;
}

.node text {
  font: 10px sans-serif;
}

.link {
  fill: none;
  stroke: #ccc;
  stroke-width: 1.5px;
}

</style>
</head>
<body>
<div id="treeShow"></div>
<script src="${rc.contextPath}/assets/js/d3.v3.min.js"></script>
<script src="${rc.contextPath}/assets/js/wsh.js"></script>
<script type="text/javascript">
function wwwwaa(){
	alert(1)
	$.ajax({
		   url: "${rc.contextPath}/message/ajaxDataTest",
		   dataType:"json",
		   success: function(data){alert(data)
			   if(data!=null){
					Console.log("data.......")
					Console.log(data)
					
					root = data;
					  root.x0 = height / 2;
					  root.y0 = 0;

					  function collapse(d) {
					    console.log("collapse")
					    if (d.children) {
					      d._children = d.children;
					      d._children.forEach(collapse);
					      d.children = null;
					    }
					  }

					  root.children.forEach(collapse);
					  update(root);
			   }
		   }
		});
	
  
 };
</script>
</body>
</html>
